import React,{Component} from "react";
import {Button, Text, View} from "react-native";
const props = {};
import { MaterialHeaderButtons, AItem } from '../../component/MyHeaderButtons';
import LinearGradient from "react-native-linear-gradient";
export default class Ucenter extends React.Component {

    static navigationOptions =  ({ navigation }) => {
        return {
            title: "个人中心",
            headerLeft: (
                <MaterialHeaderButtons>
                    <AItem
                        title="Test"
                        iconName="arrow-back"
                        onPress={() => navigation.goBack()}
                    />
                </MaterialHeaderButtons>
            ),
            headerRight: (
                <MaterialHeaderButtons>
                    <AItem title="add" iconName="search" onPress={() =>navigation.goBack()} />
                </MaterialHeaderButtons>
            ),
            headerBackground:(
                <LinearGradient start={{x:0.3, y: 1}} end={{x: 1, y: 0}} colors={['#E25956','#E7756A','#E98C7A','#EFA588','#F3C69F',]} style={{height: 74}}>
                </LinearGradient>
            )
        };
    };
    render(){
        const {navigation} = this.props;
        const uid = navigation.getParam('uid','noID');
        const msg = navigation.getParam('msg','someMsg');
        return (
            <View>

                <Text>个人中心</Text>
                <Text>{uid}</Text>
                <Text>{msg}</Text>

                <LinearGradient start={{x:0.3, y: 1}} end={{x: 1, y: 0}} colors={['#E25956','#E7756A','#E98C7A','#EFA588','#F3C69F',]} style={{height: 74}}>
                </LinearGradient>

                <Button
                    title="Go back"
                    onPress={() => this.props.navigation.goBack()}
                />
            </View>
        )
    }
}